import AccountService from './account/account.service'
import UserService from './user/user.service'
import VideoService from './video/video.service'

class ServiceManager {
  private static instance: ServiceManager

  account: AccountService
  user: UserService
  video: VideoService

  private constructor() {
    this.account = new AccountService()
    this.user = new UserService()
    this.video = new VideoService()
  }

  public static getInstance(): ServiceManager {
    if (!ServiceManager.instance) {
      ServiceManager.instance = new ServiceManager()
    }
    return ServiceManager.instance
  }
}

export const services = ServiceManager.getInstance()
export default services
